<div id="banner">
    {{title}}
</div>
<div class="container" style="margin-top: 10px">
    <form name="regForm" class="form-horizontal" role="form" novalidate ng-submit="submit()">
        <div class="form-group">
            <label for="inputPhone" class="col-xs-3 control-label sm-label label-phone">手机</label>
            <div class="col-xs-9"
                 ng-class="{'has-success has-feedback': regForm.phone.$valid, 'has-error has-feedback': regForm.phone.$invalid && regForm.phone.$dirty}">
                <input type="tel" name="phone" class="form-control" id="inputPhone" placeholder="手机号将作为登录账号"
                       required reg-phone="form.phone" ng-model="form.phone">
                <span ng-show="regForm.phone.$valid" class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
                <span ng-show="regForm.phone.$invalid && regForm.phone.$dirty" class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"></span>
                <div class="warning"
                     ng-show="regForm.phone.$invalid && regForm.phone.$dirty">
                    <span ng-show="regForm.phone.$error.required">
                        手机号不能为空
                    </span>
                    <span ng-show="regForm.phone.$error.regphone && !regForm.phone.$error.required">
                        手机号不符合格式
                    </span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword" class="col-xs-3 control-label sm-label label-psw">密码</label>
            <div class="col-xs-9"
                 ng-class="{'has-success has-feedback': regForm.psw.$valid, 'has-error has-feedback': regForm.psw.$invalid && regForm.psw.$dirty}">
                <input type="password" name="psw" class="form-control" id="inputPassword" placeholder="6-18位密码"
                       required reg-psw ng-model="form.psw">
                <span ng-show="regForm.psw.$valid" class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span>
                <span ng-show="regForm.psw.$invalid && regForm.psw.$dirty" class="glyphicon glyphicon-warning-sign form-control-feedback" aria-hidden="true"></span>
                <div class="warning"
                     ng-show="regForm.psw.$invalid && regForm.psw.$dirty">
                    <span
                            ng-show="regForm.psw.$error.required">
                        密码不能为空
                    </span>
                    <span
                            ng-show="regForm.psw.$error.regpsw && !regForm.psw.$error.required">
                        密码需为6-18位
                    </span>
                </div>
            </div>
        </div>
        <div class="form-group" style="margin-bottom: 0px">
            <label for="inputName" class="col-xs-3 control-label sm-label label-name">昵称</label>
            <div class="col-xs-9">
                <input type="text" name="nickName" class="form-control" id="inputName" ng-model="form.nickName">
            </div>
        </div>
        <div class="form-group form-group-sex">
            <label for="radioSex1" class="col-xs-3 control-label sm-label label-sex">性别</label>
            <div class="col-xs-9" ng-init="form.sex = 1">
                <label class="radio-inline">
                    <input type="radio" name="sex" id="radioSex1" value="1" ng-model="form.sex">男
                </label>
                <label class="radio-inline">
                    <input type="radio" name="sex" id="radioSex2" value="2" ng-model="form.sex">女
                </label>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-offset-3 col-xs-9">
                <a href="#/">已有账号? 登录</a>
            </div>
        </div>

        <div class="form-group">
            <div class="col-xs-12 col-thin center">
                <button type="submit" class="btn btn-block btn-main btn-blue" ng-disabled="regForm.$invalid">注册</button>
            </div>
        </div>
    </form>
</div>
